#! /bin/bash
###############################################
##
##  Copyright (2020, ) Institute of Software
##      Chinese Academy of Sciences
##          wuheng@iscas.ac.cn
##
###############################################


version="1.3.0"

function get-arch()
{
  if [[ $(arch) == "x86_64" ]]
  then
    echo "amd64"
  elif [[ $(arch) == "aarch64" ]]
  then
    echo "arm64"
  else
    echo "only support x86_64(amd64) and aarch64(arm64)"
    exit 1
  fi
}

arch=`get-arch`

docker run  --privileged=true -d -p 31003:8080 -v /home/superset:/home/superset --name superset registry.cn-beijing.aliyuncs.com/dosproj/superset:v$version-$arch
